import java.util.Scanner;
public class Test1 {
    public static void main(String[] args) {
        int num;
        for (num = 2; num <= 37; num++) {
            boolean isPrime = true;
            for (int x = 2; x < num; x++) {
                if (num % x == 0) {
                    isPrime = false;
                }
            }
            if (isPrime) {
                long result=produce(num);
                isPrime(result);
            }
        }
    }
    public static long produce (int n) {//产生大整数
        int num;
        long sum=1;
        for ( num = 2; num <= n; num++) {
            boolean isPrime = true;
            for (int x = 2; x < num; x++) {
                if (num % x == 0) {
                    isPrime = false;
                }
            }
            if (isPrime) {
                 sum=sum*num;
            }
        }
        return sum+1;
    }
    public static void isPrime (long n) {//判断是否为素数
    boolean isPrime=true;
    for(int i=2;i<=n/2;i++){
        if(n%i==0){
            isPrime=false;
            break;
            }
    }
    if(!isPrime) {
        System.out.println(n + "不为素数");
    }
    else {
        System.out.println(n+"为素数");
        }
    }
    public static int Prime() {//产生素数
        int num;
        for (num = 2; num <= 37; num++) {
            boolean isPrime = true;
            for (int x = 2; x < num; x++) {
                if (num % x == 0) {
                    isPrime = false;
                }
            }
            if (isPrime) {
                return num;
            }
        }
        return 1;
    }
}


